<template>
  <div class="onePlus wrapper">
    <swiper :banners="banners"></swiper>
    <tab-category :categorys="categorys"/>
    <template v-for="category in categorys" :key="category.id">
      <section-title :title="category?.title"/>
      <grid-view :productDetailss="category?.productDetailss" :category-url="category?.url"/>
    </template>
  </div>
</template>

<script setup lang="ts">
import {storeToRefs} from 'pinia'
import useHomeStore from '~/store/home';

const homeStore = useHomeStore();
homeStore.fetchHomeData('onePlus')
const {navbars, banners, categorys} = storeToRefs(homeStore)

</script>

<style lang="scss" scoped>
.onePlus {
  /* color: red; */
}
</style>
